package com.agilegroup.crm.requests;

import static com.agilegroup.crm.utils.CONSTANTS.*;

import com.agilegroup.crm.model.Contact;
import com.octo.android.robospice.request.springandroid.SpringAndroidSpiceRequest;

public class ViewContactJsonRequest extends SpringAndroidSpiceRequest<Contact>{

	private String id;
	
	public ViewContactJsonRequest(String id) {
		super(Contact.class);
		this.id=id;
	}
	
	@Override
	public Contact loadDataFromNetwork() throws Exception {
		return getRestTemplate().getForObject(singlecontactsURL+id+".json", Contact.class);
	}
}
